﻿@model eShop.Web.Admin.Models.AttributeModel
           
@section header{
    <title>添加属性</title>
    <link type="text/css" rel="stylesheet" href="/administration/css/site.css"/>
    <script type="text/javascript" src="/administration/scripts/jquery.js"></script>
    <script type="text/javascript" src="/administration/scripts/jquery.validate.js"></script>
    <script type="text/javascript" src="/administration/scripts/jquery.validate.unobtrusive.js"></script>
}
@section body{
    <h1 class="rightH1">
        属性管理 &gt;&gt; 添加属性
        <div class="right">
            <a href="@Html.Raw(ViewData["referer"].ToString())" class="menuBT">
                <img src="/administration/images/goback.jpg" />返回列表</a>
            <div class="clear">
            </div>
        </div>
        <div class="clear">
        </div>
    </h1>
            @using (Html.BeginForm())
            {
    <div class="addTable">
            <table width="100%">
                <tr>
                    <td width="76px" align="right">
                        所属分类：
                    </td>
                    <td>
                    <input type="hidden" name="CateId" value="@ViewData["cateId"]" />
                    <input type="text" name="CategoryName" disabled="disabled" size = "35" class = "input" value="@ViewData["categoryName"]" />
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        属性名称：
                    </td>
                    <td>@Html.TextBoxFor(x => x.AttributName, new { @class = "input", size = "35" })@Html.ValidationMessageFor(x => x.AttributName)
                    </td>
                </tr>
                <tr id="attrGroupTr">
                    <td align="right">
                        属性分组：
                    </td>
                    <td>
                        @Html.DropDownListFor(x => x.AttrGroupId, ViewData["attributeGroupList"] as List<SelectListItem>)
                        @Html.ValidationMessageFor(x => x.AttrGroupId)
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        展示类型：
                    </td>
                    <td>
                        <p>
                            <label>@Html.RadioButtonFor(x => x.ShowType, 0, new { @class = "checkbox" })文字</label>
                            <label>@Html.RadioButtonFor(x => x.ShowType, 1, new { @class = "checkbox" })图片</label>
                        @Html.ValidationMessageFor(x => x.ShowType)
                            <br />
                        </p>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        筛选属性：
                    </td>
                    <td>
                        <p>
                            <label>@Html.RadioButtonFor(x => x.IsFilter, 1, new { @class = "checkbox" })是</label>
                            <label>@Html.RadioButtonFor(x => x.IsFilter, 0, new { @class = "checkbox" })否</label>
                        @Html.ValidationMessageFor(x => x.IsFilter)
                            <br />
                        </p>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        排序：
                    </td>
                    <td>@Html.TextBoxFor(x => x.DisplayOrder, new { @class = "input", size = "3" })@Html.ValidationMessageFor(x => x.DisplayOrder)
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        &nbsp;
                    </td>
                    <td>
                        <a href="" class="addBt" id="sumbitBut">
                            <img src="/administration/images/submit.jpg" /></a>
                        <script type="text/javascript">
                            $(function () {
                                $("#sumbitBut").click(function () {
                                    $("form:first").submit();
                                    return false;
                                })
                            });
                        </script>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
    </div>
        }
}
